class Course extends Activity{
    
    String level
    static hasMany = [schedules : Schedule]

    static constraints = {
        level(inList:["Basic","Advanced","Administrator"],nullable:true)
    }

    public Float calcTotalCost(){
        return 100.00;
    }
    public Float calcTotalIncome(){
        return 0.0
    }

    /* Add employee to project */
     public void addEmployee(Employee e){
        Date d = new Date();
        if(e != null){
            Whoa w = new Whoa(member:e, year:d.getYear(), hours:0, worksInCourse:this);
            this.addToAmountOfHour(w);
        }
        else{
            System.out.println("Något gick fel:" + e)
        }
    }

    public String toString(){
        return name+" ("+activityId+")"
    }

    public Float calcTotalCost(int fromYear, int toYear)
    {
        return 1.0
    }
    public Float calcExpectedCost(int fromYear, int toYear)
    {
        return 1.0
    }
    public Float calcKnownIncome(int fromYear, int toYear)
    {
        return 1.0
    }
    public Float calcExpectedIncome(int fromYear, int toYear)
    {
        return 1.0
    }

    public List<Employee> allParticipants(){
        ArrayList<Employee> p = new ArrayList<Employee>();
        for(Schedule s in schedules){
            for(Employee e in s.participants){
                if(! p.contains(e)){
                    p.add(e);
                }
            }
        }
        return p;
    }
    public List<Employee> participantBySchedule(Schedule s){
        return s.participants
    }


}
